package com.lg.happyfarmer.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.lg.happyfarmer.fragment.EasySelectFragment;

/**
 * 首页viewpager 适配器
 * Created by Torres on 2018/4/25.
 */

public class FirstPageAdapter extends FragmentPagerAdapter {
    private String tabTitles[] = new String[]{"易选", "易店", "易行"};
    private boolean IsMerchant;

    public FirstPageAdapter(FragmentManager fm, boolean IsMerchant) {
        super(fm);
        this.IsMerchant = IsMerchant;
    }

    @Override
    public Fragment getItem(int position) {
        return EasySelectFragment.getInstance(position);
    }

    @Override
    public int getCount() {
        return tabTitles.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tabTitles[position];
    }
}
